home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / EPPC.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  4.6 KB  |  172 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        EPPC.h
  3.  
  4.      Contains:    High Level Event Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __EPPC__
  19. #define __EPPC__
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. #ifndef __APPLETALK__
  25. #include <AppleTalk.h>
  26. #endif
  27. #ifndef __FILES__
  28. #include <Files.h>
  29. #endif
  30. #ifndef __PPCTOOLBOX__
  31. #include <PPCToolbox.h>
  32. #endif
  33. #ifndef __PROCESSES__
  34. #include <Processes.h>
  35. #endif
  36. #ifndef __EVENTS__
  37. #include <Events.h>
  38. #endif
  39.  
  40.  
  41.  
  42. #if PRAGMA_ONCE
  43. #pragma once
  44. #endif
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. #if PRAGMA_IMPORT
  51. #pragma import on
  52. #endif
  53.  
  54. #if PRAGMA_STRUCT_ALIGN
  55.     #pragma options align=mac68k
  56. #elif PRAGMA_STRUCT_PACKPUSH
  57.     #pragma pack(push, 2)
  58. #elif PRAGMA_STRUCT_PACK
  59.     #pragma pack(2)
  60. #endif
  61.  
  62.  
  63. enum {
  64.                                                                 /* postOptions currently supported */
  65.     receiverIDMask                = 0x0000F000,
  66.     receiverIDisPSN                = 0x00008000,
  67.     receiverIDisSignature        = 0x00007000,
  68.     receiverIDisSessionID        = 0x00006000,
  69.     receiverIDisTargetID        = 0x00005000,
  70.     systemOptionsMask            = 0x00000F00,
  71.     nReturnReceipt                = 0x00000200,
  72.     priorityMask                = 0x000000FF,
  73.     nAttnMsg                    = 0x00000001
  74. };
  75.  
  76.  
  77. enum {
  78.                                                                 /* constant for return receipts */
  79.     HighLevelEventMsgClass        = FOUR_CHAR_CODE('jaym'),
  80.     rtrnReceiptMsgID            = FOUR_CHAR_CODE('rtrn')
  81. };
  82.  
  83.  
  84. enum {
  85.     msgWasPartiallyAccepted        = 2,
  86.     msgWasFullyAccepted            = 1,
  87.     msgWasNotAccepted            = 0
  88. };
  89.  
  90.  
  91. struct TargetID {
  92.     long                             sessionID;
  93.     PPCPortRec                         name;
  94.     LocationNameRec                 location;
  95.     PPCPortRec                         recvrName;
  96. };
  97. typedef struct TargetID                    TargetID;
  98. typedef TargetID *                        TargetIDPtr;
  99. typedef TargetIDPtr *                    TargetIDHandle;
  100. typedef TargetIDHandle                     TargetIDHdl;
  101.  
  102. typedef TargetID                         SenderID;
  103. typedef SenderID *                        SenderIDPtr;
  104.  
  105. struct HighLevelEventMsg {
  106.     unsigned short                     HighLevelEventMsgHeaderLength;
  107.     unsigned short                     version;
  108.     unsigned long                     reserved1;
  109.     EventRecord                     theMsgEvent;
  110.     unsigned long                     userRefcon;
  111.     unsigned long                     postingOptions;
  112.     unsigned long                     msgLength;
  113. };
  114. typedef struct HighLevelEventMsg        HighLevelEventMsg;
  115. typedef HighLevelEventMsg *                HighLevelEventMsgPtr;
  116. typedef HighLevelEventMsgPtr *            HighLevelEventMsgHandle;
  117. typedef HighLevelEventMsgHandle         HighLevelEventMsgHdl;
  118. typedef CALLBACK_API( Boolean , GetSpecificFilterProcPtr )(void *contextPtr, HighLevelEventMsgPtr msgBuff, const TargetID *sender);
  119. typedef STACK_UPP_TYPE(GetSpecificFilterProcPtr)                 GetSpecificFilterUPP;
  120. enum { uppGetSpecificFilterProcInfo = 0x00000FD0 };             /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  121. #define NewGetSpecificFilterProc(userRoutine)                     (GetSpecificFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, GetCurrentArchitecture())
  122. #define CallGetSpecificFilterProc(userRoutine, contextPtr, msgBuff, sender)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGetSpecificFilterProcInfo, (contextPtr), (msgBuff), (sender))
  123. EXTERN_API( OSErr )
  124. PostHighLevelEvent                (const EventRecord *    theEvent,
  125.                                  void *                    receiverID,
  126.                                  unsigned long             msgRefcon,
  127.                                  void *                    msgBuff,
  128.                                  unsigned long             msgLen,
  129.                                  unsigned long             postingOptions)                        THREEWORDINLINE(0x3F3C, 0x0034, 0xA88F);
  130.  
  131. EXTERN_API( OSErr )
  132. AcceptHighLevelEvent            (TargetID *                sender,
  133.                                  unsigned long *        msgRefcon,
  134.                                  void *                    msgBuff,
  135.                                  unsigned long *        msgLen)                                THREEWORDINLINE(0x3F3C, 0x0033, 0xA88F);
  136.  
  137. EXTERN_API( OSErr )
  138. GetProcessSerialNumberFromPortName (const PPCPortRec *    portName,
  139.                                  ProcessSerialNumber *    pPSN)                                THREEWORDINLINE(0x3F3C, 0x0035, 0xA88F);
  140.  
  141. EXTERN_API( OSErr )
  142. GetPortNameFromProcessSerialNumber (PPCPortRec *        portName,
  143.                                  const ProcessSerialNumber * pPSN)                            THREEWORDINLINE(0x3F3C, 0x0046, 0xA88F);
  144.  
  145. EXTERN_API( Boolean )
  146. GetSpecificHighLevelEvent        (GetSpecificFilterUPP     aFilter,
  147.                                  void *                    contextPtr,
  148.                                  OSErr *                err)                                THREEWORDINLINE(0x3F3C, 0x0045, 0xA88F);
  149.  
  150.  
  151.  
  152. #if PRAGMA_STRUCT_ALIGN
  153.     #pragma options align=reset
  154. #elif PRAGMA_STRUCT_PACKPUSH
  155.     #pragma pack(pop)
  156. #elif PRAGMA_STRUCT_PACK
  157.     #pragma pack()
  158. #endif
  159.  
  160. #ifdef PRAGMA_IMPORT_OFF
  161. #pragma import off
  162. #elif PRAGMA_IMPORT
  163. #pragma import reset
  164. #endif
  165.  
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169.  
  170. #endif /* __EPPC__ */
  171.  
  172.